This application claims the priority of Korean Patent Application No. 2002-69658, filed on Nov. 11, 2002 in the Korean Intellectual Property Office, which is incorporated herein in its entirety by reference.
1. Field of the Invention
The present invention relates to a method of compressing a lookup table of a non-linear function generating apparatus used in digital signal processing, a non-linear function generating apparatus, and a non-linear function generating method, and more particularly, to an improved method of compressing a lookup table for reducing memory, a non-linear function generating apparatus having a lookup table compressed using the method, and a non-linear function generating method.
2. Description of the Related Art
In general, semiconductor devices for processing digital signals use non-linear functions. In order to realize the non-linear functions in the semiconductor devices for processing digital signals, numerical formulae or lookup tables are used. Since the process of realizing the non-linear functions using the numerical formulae require a large number of calculation, lookup tables that require a relatively smaller number of calculations are commonly used. However, the lookup tables, on the other hand, require a large amount of memory, so methods for obtaining a precise approximate value while using a small-sized lookup table have been provided. An example of a non-linear function generating apparatus for reducing the size of a lookup table is disclosed in Korean Patent No. 219543 of “Non-linear Function Generating Apparatus Using Lookup Table with Reduced Size”.
The non-linear function generating apparatus disclosed in U.S. Pat. No. 6,166,781 is applied to gamma correction of image signals in CRTs. The non-linear function generating apparatus using a lookup table with reduced size disclosed in U.S. Pat. No. 6,166,781 is shown in FIG. 1.
FIG. 1 is a block diagram illustrating a conventional non-linear function generating apparatus.
Referring to FIG. 1, the conventional non-linear function generating apparatus includes a first lookup table 11, a second lookup table 12, a first adder 13, a multiplier 14, and a second adder 15.
The first lookup table 11 stores the difference between a reference input and a corresponding output, and the second lookup table 12 stores a gradient of other reference inputs adjacent to the reference input and the corresponding outputs.
The first and second adders 13 and 15 and the multiplier 14 calculate the reference input and the output signals from the first and second lookup tables 11 and 12 to output an approximate value corresponding to the reference input.
As described above, the first and second lookup tables 11 and 12 of the conventional non-linear function generating apparatus store the reference values and the gradient values that are extracted by separating the non-linear function in equal intervals. Accordingly, the capacity of the memory occupied by the lookup tables can be reduced.
Such a non-linear function is applied to a decoding process in an MP3 decoder. Hereafter, the decoding process in an MP3 decoder will be described.
A frame header is detected from bit streams of an MP3 file. Thereafter, side information as encoding information of frames, a scale factor, and a Huffman coding data are successively separated. Next, a Huffman decoding operation is performed based on the side information, and the result of the Huffman decoding operation is restored to a real sample energy value in a frequency band according to a requantize spectrum process.
Thereafter, a reordering process, a stereo decoding process, an alias reduction process, and an IMDCT and overlap adding up process are performed to output PCM data, and the PCM data are converted to analog signals by a digital/analog (D/A) converter to be output.
Here, the non-linear function is used in a requantize spectrum process. The requantize spectrum process restores the Huffman decoded result into the real sample value in the frequency band. Here, a non-linear function of Y=X4/3, where, X=0, 1/8192, 2/8192, 3/8192, . . . , 8192/8192, is used. In the conventional method of compressing, the lookup table extracts the values of the function Y=X4/3 in equal intervals that will be described with reference to the graph of FIG. 2.
FIG. 2 is a graph for explaining the conventional method of compressing the lookup table of the non-linear function generating apparatus.
Referring to FIG. 2, X-coordinate of the function Y=X4/3 is separated into a plurality of sections P1 through P6 in equal intervals. In addition, the lookup table stores reference values for each of the sections P1 through P6 and gradient values of the sections P1 through P6 for calculating the values between the reference values that are separated in equal intervals.
Referring to the graph of FIG. 2, the gradient of the function Y=X4/3 is steep at the initial state so that the graph forms a curve. As the X-coordinate values increase, the change in the gradient of the function Y=X4/3 is reduced regularly.
However, in the conventional method of compressing the lookup table of the non-linear function generating apparatus, the function values are extracted in equal intervals. Accordingly, the lookup table cannot satisfy the values existing in the curve portion, so errors occur.
The conventional method of compressing the lookup table generates a large number of errors in the sections P1 through P3 where the gradient is steep and stores an excessively large number of data in the sections P4 through P6 where the change in the gradient is regularly reduced.